import { createApp } from 'vue'
/**
 * pinia引用
 */
import { createPinia } from 'pinia'

//饿了吗plus引用
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//饿了吗plus引用

//全局css样式
import './styles/main.css'

//iconfont图标
import './styles/iconfont2.css'
import './styles/iconfont.css'

//进度条效果样式
import 'nprogress/nprogress.css'
//数字加载滚动效果引入
import countTo from 'vue3-count-to';


//饿了么中文设置
import zhCn from 'element-plus/es/locale/lang/zh-cn'

/**
 * 饿了么图标
 */
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//引入echartS
import * as echarts from 'echarts'

import App from './App.vue'
import router from './router'
/**
 * VueX引用
 */
import store from './store/index'

const app = createApp(App)



//全局挂载echarts
app.config.globalProperties.$echarts = echarts
/**
 * 饿了么图标
 */
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }

/**
 * pinia应用
 */
app.use(createPinia());
//饿了么中文设置
app.use(ElementPlus,{locale:zhCn})
app.use(ElementPlus)
app.use(router)
app.use(countTo)
/**
 * vueX文件应用
 */
app.use(store)
/**
 * 饿了么本地国际化中文设置
 */
app.use(ElementPlus, {
  locale: zhCn,
})

app.mount('#app')
